<script type="text/javascript">
$(function(){
    $.fn.dataGridOptions.formSubFun("#form",'/modules/column/link/linkEdit.html'); //表单提交  参数1：表单id 参数2：表单action地址
});
</script>
<div class="popForm">
    <form id="form"  method="post" enctype="multipart/form-data">

		<div class="formitm">
		     <label class="lab">标题：</label>
		     <div class="ipt">
		     	<input type="text" name="title" value="${link.title}" class="w400 easyui-validatebox" data-options="required: true,validType:'length[1,50]'" />
		     	<b>*</b>
		     </div>
		</div>

		<div class="formitm">
		     <label class="lab">状态：</label>
		     <div class="ipt">
		     	<input type="radio" name="status" value="0" <#if link.status?? && link.status ==0>checked="checked"</#if>/>&nbsp;&nbsp;隐藏
				<input type="radio" name="status" value="1" <#if link.status?? && link.status ==1>checked="checked"</#if>/>&nbsp;&nbsp;显示
		     </div>
		</div>
		<div class="formitm">
		     <label class="lab">排序：</label>
		     <div class="ipt">
		     	<input type="text" name="sort" value="${link.sort}" class="easyui-numberbox" data-options="required:true,validType:'length[1,4]'" maxlength="4"/>
		     	<b>*</b>
		     </div>
		</div>
		<div class="formitm">
			<label class="lab">类型：</label>
			<div class="ipt">
				<select name="type" id="type" ;>
					<option value="1" <#if link.type?? && link.type ==1>selected="selected"</#if>>友情链接</option>
				</select>
			</div>
		</div>
		<div class="formitm">
			<label class="lab">图片链接：</label>
			<div class="ipt">
				<input type="text" name="url" value="${link.url!}" class="w400 easyui-validatebox">
			</div>
		</div>
		<div class="formitm">
		     <label class="lab">图片：</label>
		     <div class="ipt">
		     	<input type="file" name="file">	
		     </div>
		</div>
		<#if link.picPath?? && (link.picPath?length gt 0)>
		<div class="formitm">
		     <div class="ipt">
		     	<img src="${image_server_url}${link.picPath!}">
		     </div>
		</div>
		</#if>

		<input name="picPath" value="${link.picPath!}" type="hidden"/>
		<input name="addTime" value="${link.addTime?string('yyyy-MM-dd HH:mm:ss')}" type="hidden"/>
		<input name="id" value="${link.id!}" type="hidden"/>
	</form>
</div>
